package com.ysu.his.vo.common;

import lombok.Getter;

@Getter
public enum ResultCodeEnum
{

    SUCCESS(200 , "操作成功") ,

    LOGIN_ERROR(201 , "用户名或者密码错误"),
    USER_EXIST(400,"用户已存在"),
    USER_NOT_EXIST(400,"用户不存在"),
    LOGIN_AUTH(400,"用户未登录"),
    USER_ISNOT_ACTIVE(400,"用户未启用"),
    VALIDATECODE_ERROR(400 , "验证码错误") ,
    VALIDATECODE_EXPIRE(422,"验证码已过期"),

    DOCTOR_SCHEDULED(400,"该医生在该时间段已经排班"),

    DOCTOR_REGISTERED(400,"该医生已经分配了挂号级别"),
    REGISTER_CODE_REPETITION(400,"挂号级别编号重复"),
    DOCTOR_NOT_SCHEDULE(400,"该医生暂未排班"),
    
    // 药房模块相关状态码
    DRUG_ADD_SUCCESS(200,"添加药品成功"),
    DRUG_UPDATE_SUCCESS(200,"修改药品成功"),
    DRUG_DELETE_SUCCESS(200,"删除药品成功"),
    DISPENSING_SUCCESS(200,"发药成功"),
    REFUND_APPLY_SUCCESS(200,"退药申请提交成功"),
    REFUND_PROCESS_SUCCESS(200,"退药处理成功"),
    
    DRUG_NOT_EXIST(400,"药品不存在"),
    PRESCRIPTION_NOT_EXIST(400,"处方不存在"),
    PRESCRIPTION_STATUS_ERROR(400,"处方状态错误"),
    DRUG_OPERATION_FAILED(400,"药品操作失败"),
    DISPENSING_FAILED(400,"发药失败"),
    REFUND_APPLY_FAILED(400,"退药失败"),
    REFUND_PROCESS_FAILED(400,"退药处理失败"),
    UPDATE_QUANTITY(400,"修改库存失败"),
    
    SYSTEM_ERROR(999,"系统错误");

    private Integer code ;      // 业务状态码
    private String message ;    // 响应消息

    private ResultCodeEnum(Integer code , String message) {
        this.code = code ;
        this.message = message ;
    }
}
